app.controller('ziyebohui',['$scope','mainService','$location','$http',function($scope,mainService,$location,$http){



$scope.submit = function () {
    if(getInputs()==false){
        return;
    }
    $http({
        method: "POST",
        url: mainUrl + '/tr/tr-present-detail!addAndUpdate4App.action',
        params: {
            'Authorization': token,
            'tcrlsid': mainService.getData().xq.yhSid, //对应yhSid	隐患sid
            'troId': mainService.getData().xq.troId,//'	隐患编码
            'presentName': JSON.parse(localStorage.getItem('userData')).userNameCn,//对应当前登录人中文
            'presentId': JSON.parse(localStorage.getItem('userData')).pin,//对应当前登录人身份证
            'backDt': getNowFormatDate ,//流转时间当前时间
            'backReason': $scope.bhyy ,//流转时间当前时间
            'version ':1 //默认 1
        }
    }).then(
        function (data, status, headers, config) {
            console.log(data)
            //$scope.data = data.data.items;

            mui.hideLoading();
            mui.toast('提交成功');
            $location.path('/liuzhuandaichuliyinhuan');
            mainService.reset()
            // document.getElementsByClassName('mui-switch-blue').addEventListener
        }, function (data, status, headers, config) {
            console.log(data)
            console.log(status)
        })

}


}])